
import store from '@/store'
const BUSINESS = 'business'
const RENTING = 'renting'

let houseTypeList = store.getters.houseTypeList

console.log(houseTypeList)

const getOptionList = (str) => {
	return houseTypeList[str].map(item => item.itemName)
}

const ImageText = [
	// 小区选项配置(二手房和租房都有)
	{
		id: 'title',
		event: '',
		type: 'input',
 		isReadonly: false,
		field: [
			{ name: '出售标题', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'title',
		event: '',
		type: 'input',
 		isReadonly: false,
		field: [
			{ name: '出租标题', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		apply: [ RENTING ],
		placeholder: '请填写'
	},
	{
		id: 'selectTime',
		event: 'click',
		type: 'input',
 		isReadonly: true,
		field: [
			{ name: '上次交易时间', value: '', active: true, type:'text', isEmpty: false, required: false, placeholder: '请选择' }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写',
		plugin: function(values) {
			let [year, month] = values
			let date = `${year}年${month}月`
			return date
		}
	},
	{
		id: 'houseId',
		event: '',
		type: 'input',
 		isReadonly: false,
		field: [
			{ name: '房屋编号', value: '', active: true, type:'number', isEmpty: false, required: false }
		],
		apply: [ BUSINESS, RENTING ],
		placeholder: '请填写'
	},
	{
		id: 'houseId',
		event: '',
		type: 'tag',
 		isReadonly: false,
		spare: 'money',
		field: [
			{ name: '抵押信息', value: '', active: true, money: '', type:'text', isEmpty: false, required: true }
		],
		selectNumber: 1,
		tags: [
			{ name: '有抵押', active: false, function: 'showInput' }, 
			{ name: '无抵押', active: false, function: 'hideInput' }
		],	
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'RentalAsk',
		event: '',
		type: 'tag',
 		isReadonly: false,
		field: [
			{ name: '出租要求（多选）', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		selectNumber: 4,
		tags: [
			{ name: '仅限女生', active: false }, 
			{ name: '作息规律', active: false }, 
			{ name: '禁养宠物', active: false }, 
			{ name: '禁止吸烟', active: false }
		],	
		apply: [ RENTING ],
		placeholder: '请填写'
	},
	{
		id: 'property',
		event: '',
		type: 'tag',
 		isReadonly: true,
		selectNumber: 1,
		tags: [
			{ name: '共有', active: false }, 
			{ name: '非共有', active: false }
		],
		field: [
			{ name: '产权所属', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'houseDevice',
		event: '',
		type: 'tag',
 		isReadonly: true,
		field: [
			{ name: '房屋设施（多选）', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		selectNumber: 21,
		tags: [
			{ name: '宽带', active: false }, 
			{ name: '空调', active: false },
			{ name: '洗衣机', active: false },
			{ name: '冰箱', active: false },
			{ name: '热水器', active: false },
			{ name: '烤箱', active: false },
			{ name: '微波炉', active: false },
			{ name: '灶具', active: false },
			{ name: '油烟机', active: false },
			{ name: '电磁炉', active: false },
			{ name: '沙发', active: false },
			{ name: '电视', active: false },
			{ name: '床', active: false },
			{ name: '天然气', active: false },
			{ name: '书桌', active: false },
			{ name: '衣柜', active: false },
			{ name: '阳台', active: false },
			{ name: '独立阳台', active: false },
			{ name: '独卫', active: false },
			{ name: '飘窗', active: false },
			{ name: '暖气', active: false }
		],
		apply: [ RENTING ],
		placeholder: '请填写'
	},
	{
		id: 'houseTag',
		event: '',
		type: 'tag',
 		isReadonly: true,
		field: [
			{ name: '标签（最多可选3个）', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		selectNumber: 3,
		tags: [
			{ name: '电梯房', active: false }, 
			{ name: '海景房', active: false },
			{ name: '学位房', active: false },
			{ name: '南北通透', active: false },
			{ name: '有暖气', active: false },
			{ name: '满两年', active: false },
			{ name: '满五年', active: false },
			{ name: '满五唯一', active: false },
			{ name: '普通装修', active: false },
			{ name: '精装修', active: false },
			{ name: '毛坯', active: false }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'houseTag',
		event: '',
		type: 'tag',
 		isReadonly: true,
		field: [
			{ name: '标签（最多可选3个）', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		selectNumber: 3,
		tags: [
			{ name: '电梯房', active: false }, 
			{ name: '海景房', active: false },
			{ name: '学位房', active: false },
			{ name: '南北通透', active: false },
			{ name: '有暖气', active: false },
			{ name: '拎包入住', active: false },
			{ name: '全新装修', active: false },
			{ name: '普通装修', active: false },
			{ name: '精装修', active: false },
			{ name: '押一付一', active: false },
			{ name: '押二付一', active: false }
		],
		apply: [ RENTING ],
		placeholder: '请填写'
	},
	{
		id: 'houseCore',
		event: '',
		type: 'text',
 		isReadonly: false,
		field: [
			{ name: '核心卖点', value: '', active: true, type:'text', isEmpty: false, required: true }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'layout',
		event: '',
		type: 'text',
 		isReadonly: false,
		field: [
			{ name: '户型介绍', value: '', active: true, type:'text', isEmpty: false, required: false }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'village',
		event: '',
		type: 'text',
 		isReadonly: false,
		field: [
			{ name: '小区介绍', value: '', active: true, type:'text', isEmpty: false, required: false }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'Peripheral',
		event: '',
		type: 'text',
 		isReadonly: false,
		field: [
			{ name: '周边配套', value: '', active: true, type:'text', isEmpty: false, required: false }
		],
		apply: [ BUSINESS ],
		placeholder: '请填写'
	},
	{
		id: 'houseCore',
		event: '',
		type: 'text',
 		isReadonly: false,
		field: [
			{ name: '房屋介绍', value: '', active: true, type:'text', isEmpty: false, required: false }
		],
		apply: [ RENTING ],
		placeholder: '请填写'
	}
]

export default ImageText